/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gestion;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Juan Antonio Tirado
 */
@Embeddable
public class AlbaranFacturaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "ID_albaran")
    private int iDalbaran;
    @Basic(optional = false)
    @Column(name = "ID_factura")
    private int iDfactura;

    public AlbaranFacturaPK() {
    }

    public AlbaranFacturaPK(int iDalbaran, int iDfactura) {
        this.iDalbaran = iDalbaran;
        this.iDfactura = iDfactura;
    }

    public int getIDalbaran() {
        return iDalbaran;
    }

    public void setIDalbaran(int iDalbaran) {
        this.iDalbaran = iDalbaran;
    }

    public int getIDfactura() {
        return iDfactura;
    }

    public void setIDfactura(int iDfactura) {
        this.iDfactura = iDfactura;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) iDalbaran;
        hash += (int) iDfactura;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AlbaranFacturaPK)) {
            return false;
        }
        AlbaranFacturaPK other = (AlbaranFacturaPK) object;
        if (this.iDalbaran != other.iDalbaran) {
            return false;
        }
        if (this.iDfactura != other.iDfactura) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "laboratorio.AlbaranFacturaPK[iDalbaran=" + iDalbaran + ", iDfactura=" + iDfactura + "]";
    }

}
